-- GENERATED SPELL FOR [Ruul the Darkener] --


function spell0_21315(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21315', 608, 1)
end

function spell1_21315(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21315', 536, 1)
end

function Sorts_21315(pUnit, Event)
local choix_sorts_21315 = math.random(0, 1)
if choix_sorts_21315 == 0 then
pUnit:RegisterEvent('spell0_21315', 1, 1)
end
if choix_sorts_21315 == 1 then
pUnit:RegisterEvent('spell1_21315', 1, 1)
end
end

function mob21315_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21315', math.random(1500, 3000), 1)
end

function mob21315_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21315_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21315_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21315, 1, 'mob21315_Action')
RegisterUnitEvent(21315, 2, 'mob21315_Leave')
RegisterUnitEvent(21315, 3, 'mob21315_Kill')
RegisterUnitEvent(21315, 4, 'mob21315_Die')
